<style>
    h2 a {
        text-decoration: none;
        color: cadetblue;
        margin-right: 10px;
    }

    h2 a:hover {
        text-decoration: underline;
        color: brown;
    }

    h2 a:last-child {
        margin-right: 0;
    }
    .current{
        color: brown;
        text-decoration: underline;
    }
    .info{
        text-align: right;
        font-size: 14px;
        max-width: 550px;
        margin: 0 auto;
    }
    .info a{
        color: coral;
        text-decoration: none;
    }
    .info a:hover{
        text-decoration: underline;
        color: #3815ea;
    }
</style>
<H1>会员注册管理系统</H1>
<!--只有登录以后才显示登录者信息-->
<?php
if(isset($_SESSION['loggedUsername'])){
?>
<div class="info">
    欢迎 <?php echo $_SESSION['loggedUsername'];?> ，<a href="logout.php">注销登录</a>
</div>
<?php
}
?>
<h2>
    <?php
    $navID = $_GET['navID'] ?? 1;
    ?>
    <a href="index.php?navID=1" <?php if($navID == 1){echo 'class="current"';} ?>>回到首页</a>
    <a href="reg.php?navID=2" <?php if($navID == 2){echo 'class="current"';} ?>>会员注册</a>
    <a href="login.php?navID=3" <?php if($navID == 3){echo 'class="current"';} ?>>会员登录</a>
    <a href="#">资料修改</a>
    <a href="#">后台管理</a>
</h2>